﻿using DevExpress.XtraGrid.Demos.util;
using DXApplicationTangche.DTO;
using DXApplicationTangche.service;
using DXApplicationTangche.UC.成品出库单.service;
using DXApplicationTangche.UC.订单一览新.辅料.service;
using DXApplicationTangche.UC.金蝶.dto;
using DXApplicationTangche.Utils;
using Kingdee.BOS.WebApi.Client;
using mendian;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static DXApplicationTangche.UC.金蝶.dto.BomDTO;
using static DXApplicationTangche.UC.金蝶.dto.MaterialDTO;
using static DXApplicationTangche.UC.金蝶.dto.MaterialResultDTO;

namespace DXApplicationTangche.UC.货号管理.service
{
    public class 货号管理Service
    {
        /// <summary>
        /// 取最新货号
        /// </summary>
        /// <returns></returns>
        public static List<SaleStyleSample> getSaleStyleSampleWithDateTime(int fromIndex, int toIndex)
        {
            try
            {
                return
                    FunctionHelper.JsonDeserialization<List<SaleStyleSample>>(
                        RestCall.httpGetMethod(
                            URL.接口url + "/sale_style/getSaleStyleSampleWithDateTime?fromIndex=" + fromIndex
                             + "&toIndex=" + toIndex
                            )
                        );
            }
            catch
            {
                return new List<SaleStyleSample>();
            }

        }
        /// <summary>
        /// 销售款式一览
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public static List<DTO销售款式> get销售款式一览(int pageIndex, int pageSize)
        {
            try
            {
                return
                    FunctionHelper.JsonDeserialization<List<DTO销售款式>>(
                        RestCall.httpGetMethod(
                            URL.接口url + "/sale_style/getSaleStyleAll?pageIndex=" + pageIndex + "&pageSize=" + pageSize
                            )
                        );
            }
            catch
            {
                return new List<DTO销售款式>();
            }
        }
        /// <summary>
        /// 根据销售款式获取样衣一览
        /// </summary>
        /// <param name="saleStyleCode"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public static List<SaleStyleSample> getSaleStyleSample(String saleStyleCode, int pageIndex, int pageSize)
        {
            try
            {
                return
                    FunctionHelper.JsonDeserialization<List<SaleStyleSample>>(
                        RestCall.httpGetMethod(
                            URL.接口url + "/sale_style/getSaleStyleSample?saleStyleCode=" + saleStyleCode
                             + "&pageIndex=" + pageIndex
                             + "&pageSize=" + pageSize
                            )
                        );
            }
            catch
            {
                return new List<SaleStyleSample>();
            }

        }
        /// <summary>
        /// 根据水洗标码创建销售款式和货号
        /// </summary>
        /// <param name="barcode"></param>
        /// <param name="styleTag"></param>
        /// <param name="styleSexFlag"></param>
        /// <param name="salePrice"></param>
        /// <returns></returns>
        public static DTO销售款式 createInvetoryByBarcode(String barcode, String styleTag, String styleSexFlag, Double salePrice)
        {
            string re =
                RestCall.httpGetMethod(
                    URL.接口url + "/sale_style/createInvetoryByBarcode?barcode=" + barcode
                                + "&styleTag=" + styleTag
                                + "&styleSexFlag=" + styleSexFlag
                                + "&salePrice=" + salePrice
                    );
            return FunctionHelper.JsonDeserialization<DTO销售款式>(re);
        }
        /// <summary>
        /// 样衣登记并上传样衣图片
        /// </summary>
        /// <param name="barcode"></param>
        /// <param name="styleTag"></param>
        /// <param name="styleSexFlag"></param>
        /// <param name="salePrice"></param>
        /// <param name="ofd"></param>
        /// <returns></returns>
        public static DTO销售款式 postCreateInvetoryByBarcode(String barcode, String styleTag, String styleSexFlag, Double salePrice, OpenFileDialog ofd)
        {
            string re =
                FileService.UploadRequest(
                    URL.接口url + "/sale_style/createInvetoryByBarcode?barcode=" + barcode
                                + "&styleTag=" + styleTag
                                + "&styleSexFlag=" + styleSexFlag
                                + "&salePrice=" + salePrice,
                    ofd.FileName,
                    Path.GetFileName(ofd.FileName),
                    "multipartFile"
                    );
            return FunctionHelper.JsonDeserialization<DTO销售款式>(re);
        }
        /// <summary>
        /// 根据销售款式查询工厂门店套号销售出库记录
        /// </summary>
        /// <param name="saleStyleCode"></param>
        /// <returns></returns>
        public static DTO工厂门店套号销售出库 getStyleSaleInfo(String saleStyleCode)
        {
            try
            {
                return
                    FunctionHelper.JsonDeserialization<DTO工厂门店套号销售出库>(
                            RestCall.httpGetMethod(
                                URL.接口url + "/sale_style/getStyleSaleInfo?refStyleId=" + saleStyleCode
                                )
                            );
            }
            catch
            {
                return new DTO工厂门店套号销售出库();
            }
        }
        /// <summary>
        /// 销售款式废弃
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static String deprecateSaleStyle(String id)
        {
            try
            {
                String re =
                    RestCall.httpGetMethod(
                        URL.接口url + "/sale_style/deprecateSaleStyle?id=" + id
                        );
                return re;
            }
            catch
            {
                return null;
            }
        }
        /// <summary>
        /// 销售样衣废弃
        /// </summary>
        /// <param name="saleInventoryId"></param>
        /// <returns></returns>
        public static String deprecateInventoryNo(String saleInventoryMatialId)
        {
            try
            {
                String re =
                    RestCall.httpGetMethod(
                        URL.接口url + "/sale_style/deprecateInventoryNo?saleInventoryMatialId=" + saleInventoryMatialId
                        );
                return re;
            }
            catch
            {
                return null;
            }
        }
        /// <summary>
        /// 更新销售样衣辅料清单
        /// </summary>
        /// <param name="barcode"></param>
        /// <param name="saleInventoryMatialId"></param>
        /// <param name="styleAccessoryDTOS"></param>
        /// <returns></returns>
        public static String saveSaleInventoryAccessory(String barcode, String saleInventoryMatialId, List<StyleAccessoryDTO> styleAccessoryDTOS)
        {
            try
            {
                String re =
                    RestCall.PostHttp(
                        URL.接口url + "/sale_style/saveSaleInventoryAccessory?barcode=" + barcode + "&saleInventoryMatialId=" + saleInventoryMatialId,
                        FunctionHelper.JsonSerialization(styleAccessoryDTOS)
                        );
                return re;
            }
            catch
            {
                return null;
            }
        }
        /// <summary>
        /// 上传样衣图片
        /// </summary>
        /// <param name="saleInventoryMatialId"></param>
        /// <param name="ofd"></param>
        /// <returns></returns>
        public static String saveSaleInventoryMatialId(String saleInventoryMatialId, OpenFileDialog ofd)
        {
            return
                FileService.UploadRequest(
                    URL.接口url + "/sale_style/saveSaleInventoryMatialId?saleInventoryMatialId=" + saleInventoryMatialId,
                    ofd.FileName,
                    Path.GetFileName(ofd.FileName),
                    "multipartFile"
                    );
        }
        /// <summary>
        /// 根据成衣码获取标准款style id
        /// </summary>
        /// <param name="barcode"></param>
        /// <returns></returns>
        public static String getStandardRefStyleIdByBarcode(String barcode)
        {
            return
                RestCall.httpGetMethod(
                    URL.接口url + "/sale_style/getStandardRefStyleIdByBarcode?barcode=" + barcode
                );
        }
        /// <summary>
        /// 根据成衣码查询销售款式
        /// </summary>
        /// <param name="barcode"></param>
        /// <returns></returns>
        public static DTO销售款式 getSaleStyleByBarcode(String barcode)
        {
            return
                FunctionHelper.JsonDeserialization<DTO销售款式>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/sale_style/getSaleStyleByBarcode?barcode=" + barcode
                        )
                    );
        }
        /// <summary>
        /// 根据销售样衣saleStyleId获取销售款式
        /// </summary>
        /// <param name="saleStyleId"></param>
        /// <returns></returns>
        public static DTO销售款式 getSaleStyleBySaleStyleId(String saleStyleId)
        {
            return
                FunctionHelper.JsonDeserialization<DTO销售款式>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/sale_style/getSaleStyleBySaleStyleId?saleStyleId=" + saleStyleId
                        )
                    );
        }
        /// <summary>
        /// 根据成衣码查询样衣
        /// </summary>
        /// <param name="barcode"></param>
        /// <returns></returns>
        public static SaleStyleSample getSaleStyleSampleByBarcode(String barcode)
        {
            return
                FunctionHelper.JsonDeserialization<SaleStyleSample>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/sale_style/getSaleStyleSampleByBarcode?barcode=" + barcode
                        )
                    );
        }
        /// <summary>
        /// 根据面料和款式取样衣信息
        /// </summary>
        /// <param name="styleNameCn"></param>
        /// <param name="materialNo"></param>
        /// <returns></returns>
        public static SaleStyleSample getSaleStyleSampleById(String styleNameCn, String materialNo)
        {
            return
                FunctionHelper.JsonDeserialization<SaleStyleSample>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/sale_style/getSaleStyleSampleById?styleNameCn=" + styleNameCn + "&materialNo="+ materialNo
                        )
                    );
        }
        /// <summary>
        /// 样衣创建BOM完成
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static String buildSaleSampleCreateBom(String id)
        {
            return
                RestCall.httpGetMethod(
                    URL.接口url + "/sale_style/buildSaleSampleCreateBom?id=" + id
                );
        }
        /// <summary>
        /// 水洗标是否存在
        /// </summary>
        /// <param name="barcode"></param>
        /// <returns></returns>
        public static Boolean barcodeExisted(String barcode)
        {
            return
                FunctionHelper.JsonDeserialization<Boolean>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/garment/barcodeExisted?barcode=" + barcode
                        )
                    );
        }
        public static KingDeeMaterialIntoDTO getKingDeeMaterialIntoDTO(String materialCode)
        {
            return
                FunctionHelper.JsonDeserialization<KingDeeMaterialIntoDTO>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/material/getKingDeeMaterialIntoDTO?materialCode=" + materialCode
                        )
                    );
        }
        /// <summary>
        /// 判断样衣BOM是否存在
        /// </summary>
        /// <param name="styleNam"></param>
        /// <returns></returns>
        public static Boolean sampleGarmentMaterialExited(String styleName, String materialNo)
        {
            return
                FunctionHelper.JsonDeserialization<Boolean>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/bom/sampleGarmentMaterialExited?styleName=" + styleName + "&materialNo=" + materialNo
                        )
                    );
        }
        /// <summary>
        /// 创建EBOM
        /// </summary>
        /// <param name="styleName"></param>
        /// <param name="materialNo"></param>
        /// <param name="styleSizeCd"></param>
        /// <param name="fid"></param>
        /// <param name="fnumber"></param>
        /// <returns></returns>
        
        public static void saveEBOM(BomCreateDTO bomCreateDTO)
        {
            String xx = FunctionHelper.JsonSerialization(bomCreateDTO);
            RestCall.PostHttp(
                URL.接口url + "/bom/saveEBOM",
                FunctionHelper.JsonSerialization(bomCreateDTO)
                );
        }
        /// <summary>
        /// 根据款料获取EBOM
        /// </summary>
        /// <param name="styleName"></param>
        /// <param name="materialNo"></param>
        /// <returns></returns>
        public static List<KingDeeEBOMResultDTO> getEBOMAll(String styleName, String materialNo)
        {
            return
                FunctionHelper.JsonDeserialization<List<KingDeeEBOMResultDTO>>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/bom/getEBOMAll?styleName=" + styleName + "&materialNo=" + materialNo
                        )
                    );
        }
        /// <summary>
        /// 样衣登记时建立金蝶物料
        /// </summary>
        /// <param name="FName"></param>
        /// <param name="FSpecification"></param>
        //public static String 金蝶物料保存(String FName, String FSpecification)
        //{
        //    // 使用webapi引用组件Kingdee.BOS.WebApi.Client.dll
        //    K3CloudApiClient client = new K3CloudApiClient("http://192.168.3.251/k3cloud/");
        //    var loginResult = client.ValidateLogin("6128407938e2f2", "Administrator", "Sshirt@1234", 2052);
        //    var resultType = JObject.Parse(loginResult)["LoginResultType"].Value<int>();
        //    String Fnumber;
        //    //登录结果类型等于1，代表登录成功
        //    if (resultType == 1)
        //    {
        //        //保存
        //        String result = client.Save("BD_MATERIAL", FunctionHelper.JsonSerialization(new Root(FName, FSpecification)));
        //        //根据保存返回值取fId Fnumber
        //        KingDeeAddResultRoot materialResultRoot;
        //        try
        //        {
        //            materialResultRoot = FunctionHelper.JsonDeserialization<KingDeeAddResultRoot>(result);
        //        }
        //        catch
        //        {
        //            return null;
        //        }
        //        //提交
        //        String Submitresult = client.Submit("BD_MATERIAL", FunctionHelper.JsonSerialization(new MaterialSubmitDTO(materialResultRoot.Result.Number, materialResultRoot.Result.Id.ToString())));
        //        Fnumber = materialResultRoot.Result.Number;
        //        //审核
        //        String SupplierVerifyresult = client.Audit("BD_MATERIAL", FunctionHelper.JsonSerialization(new MaterialVerifyDTO(materialResultRoot.Result.Number, materialResultRoot.Result.Id.ToString())));
        //    }
        //    else
        //    {
        //        return null;
        //    }
        //    return Fnumber;
        //}
        //public static KindDeeApplyReturnDTO BOM创建(String Fname, String Fnumber, int FGroup, List<ChildDTO> childDTO)
        //{
        //    // 使用webapi引用组件Kingdee.BOS.WebApi.Client.dll
        //    K3CloudApiClient client = new K3CloudApiClient("http://192.168.3.251/k3cloud/");
        //    var loginResult = client.ValidateLogin("6128407938e2f2", "Administrator", "Sshirt@1234", 2052);
        //    var resultType = JObject.Parse(loginResult)["LoginResultType"].Value<int>();
        //    //登录结果类型等于1，代表登录成功
        //    if (resultType == 1)
        //    {
        //        //保存EBOM
        //        String result = client.Save("ENG_BOM", FunctionHelper.JsonSerialization(new BomRoot(Fname, Fnumber, FGroup, childDTO)));
        //        KingDeeAddResultRoot kingDeeAddResultRoot = FunctionHelper.JsonDeserialization<KingDeeAddResultRoot>(result);
        //        //判断返回值，成功和失败分开
        //        //result保存成功
        //        if (Convert.ToBoolean(kingDeeAddResultRoot.Result.ResponseStatus.IsSuccess))
        //        {
        //            //审核提交
        //            String Submitresult = client.Submit("ENG_BOM", FunctionHelper.JsonSerialization(new MaterialSubmitDTO(kingDeeAddResultRoot.Result.Number, kingDeeAddResultRoot.Result.Id.ToString())));
        //            String Verifyresult = client.Audit("ENG_BOM", FunctionHelper.JsonSerialization(new MaterialVerifyDTO(kingDeeAddResultRoot.Result.Number, kingDeeAddResultRoot.Result.Id.ToString())));
        //        }
        //        return kingDeeAddResultRoot.build();
        //    }
        //    //登录失败
        //    else
        //    {
        //        return new KindDeeApplyReturnDTO(false, "登录失败");
        //    }
        //}

        /// <summary>
        /// 金蝶EBOM保存
        /// </summary>
        /// <param name="styleNameCn">款式</param>
        /// <param name="materialCode">面料</param>
        /// <param name="styleSizeCd">尺码</param>
        /// <param name="childDTOs">面辅料固定损耗</param>
        //public static KindDeeApplyReturnDTO 金蝶EBOM保存(String styleNameCn, String materialCode, String styleSizeCd, List<ChildDTO> childDTOs)
        //{
            ////金蝶保存样衣物料，输入款号，物料号，输出样衣物料内码
            //String Fnumber = 货号管理Service.金蝶物料保存(styleNameCn, materialCode);
            ///*创建BOM，输入：
            // *BOM名称：款+料号+尺码
            // * 父项物料编码：样衣物料内码
            // * BOM分组
            // * 子项物料编码：通过接口查询Fnumber
            // * 子项目单耗：前台传unitConsumption
            // * 输出：fid，fnumber
            // */
            ////保存样衣返回值在BOM创建方法写入
            //KindDeeApplyReturnDTO kindDeeApplyReturnDTO =
            //    货号管理Service.BOM创建(
            //        styleNameCn + " " + materialCode + " " + styleSizeCd,
            //        Fnumber,
            //        0,
            //        childDTOs
            //    );
            ////根据金蝶保存样衣返回值判断是否调用接口
            ////IsSuccess为true，调用创建EBOM接口
            //if (kindDeeApplyReturnDTO.IsSuccess)
            //{
            //    //样衣Fid，Fnumber为空时，返回
            //    if (String.IsNullOrEmpty(kindDeeApplyReturnDTO.FId) || String.IsNullOrEmpty(kindDeeApplyReturnDTO.FNumber))
            //    {
            //        return new KindDeeApplyReturnDTO(false, "样衣创建失败，请检查款式与面料号是否正确");
            //    }
            //    /*BOM创建完调用创建EBOM接口，输入：
            //         * 款式名称
            //         * 面料号
            //         * 尺码
            //         * fid 创建BOM返回
            //         * fnumber 创建BOM返回
            //         */
            //    //样衣Fid，Fnumber不为空时，调用saveEBOM接口
            //    BomCreateDTO EBOM保存 = new BomCreateDTO(styleNameCn, materialCode, styleSizeCd, kindDeeApplyReturnDTO.FId, kindDeeApplyReturnDTO.FNumber);
            //    货号管理Service.saveEBOM(EBOM保存);
            //}
            //return kindDeeApplyReturnDTO;
        //}
        /// <summary>
        /// 取未出库合计一览，带图片
        /// </summary>
        /// <returns></returns>
        public static List<BatchExecuteRecordSummaryDTO> getBatchExecuteRecordSummaryAll()
        {
            return
                FunctionHelper.JsonDeserialization<List<BatchExecuteRecordSummaryDTO>>(
                    RestCall.httpGetMethod(
                        URL.接口url + "/barcode/getBatchExecuteRecordSummaryAll"
                        )
                    );
        }
    }
    public class BatchExecuteRecordSummaryDTO
    {
        public String styleCode { get; set; }  // 款式
        public String materialCode { get; set; }    // 面料
        public String styleSizeCd { get; set; }    // 尺码
        public int quantity { get; set; }   //  水洗创建到入库的时间
        public String sampleImagePath { get; set; } //  实例图片
        public BatchExecuteRecordSummaryDTO()
        {

        }
    }
    public class BatchExecuteRecordSummaryReportDTO
    {
        public String styleCode { get; set; }  // 款式
        public String materialCode { get; set; }    // 面料
        public String styleSizeCd { get; set; }    // 尺码
        public int quantity { get; set; }   //  水洗创建到入库的时间
        public Image sampleImage { get; set; } //  实例图片
        public BatchExecuteRecordSummaryReportDTO()
        {

        }
        public BatchExecuteRecordSummaryReportDTO(BatchExecuteRecordSummaryDTO batchExecuteRecordSummaryDTO)
        {
            this.styleCode = batchExecuteRecordSummaryDTO.styleCode;
            this.materialCode = batchExecuteRecordSummaryDTO.materialCode;
            this.styleSizeCd = batchExecuteRecordSummaryDTO.styleSizeCd;
            this.quantity = batchExecuteRecordSummaryDTO.quantity;
            this.sampleImage = ImageUtil.UrlPathToImage(batchExecuteRecordSummaryDTO.sampleImagePath);
        }
    }
    public class KingDeeEBOMResultDTO
    {
        public String cadFilePath { get; set; }
        public String fid { get; set; }
        public String fnumber { get; set; }
        public String styleSizeCd { get; set; }
        public Boolean mbom { get; set; }
        public KingDeeEBOMResultDTO()
        {

        }

        public KingDeeEBOMResultDTO(string cadFilePath, string fid, string fnumber, string styleSizeCd, bool mbom)
        {
            this.cadFilePath = cadFilePath;
            this.fid = fid;
            this.fnumber = fnumber;
            this.styleSizeCd = styleSizeCd;
            this.mbom = mbom;
        }
    }
    public class KingDeeMaterialIntoDTO
    {
        public String fid { get; set; }
        public String fnumber { get; set; }
        public String kingDeeSyncDate { get; set; }
        public String materialCode { get; set; }
        public KingDeeMaterialIntoDTO()
        {

        }
    }
    /// <summary>
    /// 销售款式DTO
    /// </summary>
    public class DTO销售款式
    {
        public DateTime createDate { get; set; } //创建时间
        public Boolean deprecated { get; set; } //是否作废
        public String designStyleCADFilePath { get; set; } //版型文件路径
        public String designStyleCode { get; set; } //工艺款号
        public String designStyleId { get; set; } //工艺款式id
        public String designStyleName { get; set; } //工艺款式
        public String id { get; set; } //销售款式id
        public String saleStyleCode { get; set; } //销售款式
        public String sytleCategoryCode { get; set; } //款式类别code
        public String sytleCategoryId { get; set; } //款式类别ID
        public String sytleCategoryName { get; set; } //款式类别
        public String styleTag { get; set; }    //  款式描述
        public String styleSexFlag { get; set; }   //  男 女 男童 女童
        public DTO销售款式()
        {

        }
    }
    /// <summary>
    /// 销售款下样衣一览DTO
    /// </summary>
    public class SaleStyleSample
    {
        public String saleInventoryId { get; set; } //  货号主键
        public int inventorySuffix { get; set; } //  货号后缀   给出货号定义年月
        public int refInventorySuffix { get; set; } //  参考货号后缀
        public String saleStyleId { get; set; } //  销售款式id 
        public String saleStyleCode { get; set; }   //  款号，销售定义
        public String saleInventoryMatialId { get; set; }   //  货号对应物料定义
        public String styleNameCN { get; set; } //  工艺款式名称
        public int materialId { get; set; } //  物料数据库ID
        public String materialCode { get; set; }    //  物料编码
        public String materialDesc { get; set; }  //  物料描述
        public String materialComposition { get; set; } //  成分
        public String vendorName { get; set; }  //  供应商
        public String materialImagePath { get; set; } //  物料图片路径
        public List<StyleAccessoryDTO> styleAccessoryDTOS { get; set; } = new List<StyleAccessoryDTO>();  //  辅料清单
        public String stockInventoryNo { get; set; }
        public String saleId { get; set; }  //  价格体系主键，商品定价的唯一标识
        public Double salePrice { get; set; }   //  零售价
        public String sampleImagePath { get; set; }  //  实例图片
        public DateTime createDate { get; set; } //创建时间
        public Boolean bomcreated  { get; set; } = false;
        public SaleStyleSample()
        {

        }
    }
    /// <summary>
    /// 工厂门店套号销售出库记录DTO
    /// </summary>
    public class DTO工厂门店套号销售出库
    {
        public List<StockInOutDetailDTO> stockInOutDetailDTOSFactorySaleOut { get; set; } = new List<StockInOutDetailDTO>();  //工厂销售出库
        public List<StockInOutDetailDTO> stockInOutDetailDTOSFactorySaleOutRecent { get; set; } = new List<StockInOutDetailDTO>(); //工厂最近14天销售出库
        public List<StockInOutDetailDTO> stockInOutDetailDTOSShopSaleOut { get; set; } = new List<StockInOutDetailDTO>();  //  门店销售出库
        public List<StockInOutDetailDTO> stockInOutDetailDTOSShopSaleOutRecent { get; set; } = new List<StockInOutDetailDTO>();   //门店最近14天销售出库
        public DTO工厂门店套号销售出库()
        {

        }
    }
    public class BomCreateDTO
    {
        public String styleName { get; set; }    //  
        public String materialNo { get; set; }  //  
        public String styleSizeCd { get; set; } //  
        public String fid { get; set; }  //  
        public String fnumber { get; set; } // 
        public BomCreateDTO()
        {

        }

        public BomCreateDTO(string styleName, string materialNo, string styleSizeCd, string fid, string fnumber)
        {
            this.styleName = styleName;
            this.materialNo = materialNo;
            this.styleSizeCd = styleSizeCd;
            this.fid = fid;
            this.fnumber = fnumber;
        }
    }
}
